
package com.jiuqi.irs.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for tbDetailproof.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="tbDetailproofForm"
 */
public class TbPaymentForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String paymentId = null;
   
   private java.lang.String orgGuid = null;

   private java.lang.String useQuantity = null;

   private java.lang.String paymentYear = null;
   
   private java.lang.String paymentCreatTime = null;
   
   private java.lang.String paymentLastTime = null;
   
   private java.lang.String paymentType = null;
  
   private java.lang.String reserved1 = null;
  
   private java.lang.String reserved2 = null;
  
   private java.lang.String reserved3 = null;
   /**
    * Standard constructor.
    */
   public TbPaymentForm() {
   }

  



public java.lang.String getPaymentId() {
	return paymentId;
}





public void setPaymentId(java.lang.String paymentId) {
	this.paymentId = paymentId;
}





public java.lang.String getOrgGuid() {
	return orgGuid;
}





public void setOrgGuid(java.lang.String orgGuid) {
	this.orgGuid = orgGuid;
}





public java.lang.String getUseQuantity() {
	return useQuantity;
}





public void setUseQuantity(java.lang.String useQuantity) {
	this.useQuantity = useQuantity;
}





public java.lang.String getPaymentYear() {
	return paymentYear;
}





public void setPaymentYear(java.lang.String paymentYear) {
	this.paymentYear = paymentYear;
}





public java.lang.String getPaymentCreatTime() {
	return paymentCreatTime;
}





public void setPaymentCreatTime(java.lang.String paymentCreatTime) {
	this.paymentCreatTime = paymentCreatTime;
}





public java.lang.String getPaymentLastTime() {
	return paymentLastTime;
}





public void setPaymentLastTime(java.lang.String paymentLastTime) {
	this.paymentLastTime = paymentLastTime;
}





public java.lang.String getPaymentType() {
	return paymentType;
}





public void setPaymentType(java.lang.String paymentType) {
	this.paymentType = paymentType;
}





public java.lang.String getReserved1() {
	return reserved1;
}





public void setReserved1(java.lang.String reserved1) {
	this.reserved1 = reserved1;
}





public java.lang.String getReserved2() {
	return reserved2;
}





public void setReserved2(java.lang.String reserved2) {
	this.reserved2 = reserved2;
}





public java.lang.String getReserved3() {
	return reserved3;
}





public void setReserved3(java.lang.String reserved3) {
	this.reserved3 = reserved3;
}





public static SimpleDateFormat getFormat() {
	return FORMAT;
}






/**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getOrgGuid() == null) {
         errors.add("orgGuid", new ActionError("error.orgGuid.required"));
      }
      if(getPaymentId() == null) {
         errors.add("paymentId", new ActionError("error.paymentId.required"));
      }
     
      // TODO test format/data
      return errors;
   }
}
